package com.zkj.response;

import java.awt.image.BufferedImage;
import java.io.IOException;

import javax.imageio.ImageIO;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.zkj.util.YanZhengma;

public class Servlet_Yanzm extends HttpServlet {

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		// BufferedImage image = YanZhengma.MakeNewYanZhengMa("shuzi", 200, 40);
		BufferedImage image = YanZhengma.MakeNewYanZhengMa("hz", 200, 40);

		ServletOutputStream out = response.getOutputStream();
		ImageIO.write(image, "jpg", out);

	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		doGet(request, response);
	}

}
